		
		*********************************************************************************
		* Table A.3: Postal Voting and Turnout in Referendums, 1981-2009 (Cantonal-level 	Referendum Data)
		*********************************************************************************
		
		scalar year_up=2011	
		
		use data7.dta, clear	
		
		gen canton=knr
			
		gen postal_all=0
		replace postal_all=1 if canton==1 & anrbfs >=415
		replace postal_all=1 if canton==2 & anrbfs >=373
		replace postal_all=1 if canton==3 & anrbfs >=415
		replace postal_all=1 if canton==4 & anrbfs >=418
		replace postal_all=1 if canton==5 & anrbfs >=459
		replace postal_all=1 if canton==6 & anrbfs >=425
		replace postal_all=1 if canton==7 & anrbfs >=413
		replace postal_all=1 if canton==8 & anrbfs >=425
		replace postal_all=1 if canton==9 & anrbfs >=434
		replace postal_all=1 if canton==10 & anrbfs >=422
		replace postal_all=1 if canton==11 & anrbfs >=326
		replace postal_all=1 if canton==12 & anrbfs >=418
		replace postal_all=1 if canton==13 & anrbfs >=288
		replace postal_all=1 if canton==14 & anrbfs >=425
		replace postal_all=1 if canton==15 & anrbfs >=351
		replace postal_all=1 if canton==16 & anrbfs >=299
		replace postal_all=1 if canton==17 & anrbfs >=297
		replace postal_all=1 if canton==18 & anrbfs >=418
		replace postal_all=1 if canton==19 & anrbfs >=389
		replace postal_all=1 if canton==20 & anrbfs >=334
		replace postal_all=1 if canton==21 & anrbfs >=517
		replace postal_all=1 if canton==22 & anrbfs >=487
		replace postal_all=1 if canton==23 & anrbfs >=517
		replace postal_all=1 if canton==24 & anrbfs >=474
		replace postal_all=1 if canton==25 & anrbfs >=418
		replace postal_all=1 if canton==26 & anrbfs >=454
		
		drop canton
		
		merge m:1 knr year using data9.dta, // merge covariates

		drop if _merge==1	// drop all observations for which we have only aggregate information
				
		gen turnout=bet_mean/100
		sort knr time
		egen abstag=group(time)
		drop canton
		gen canton=knr
		
		xtset knr abstag
		
		gen sample=0
		replace sample=1 if catholic!=. &  university!=. & share_over60!=. 

		reg turnout    postal_all ///
		if inrange(year,1981,year_up)  & sample==1, vce(cluster abstag)
		outreg2 using table_a3.xls , excel  stats(coef se  ) noaster cttop("time FE") dec(2) replace	label


		reg turnout    postal_all ///
		i.abstag i.canton   if inrange(year,1981,year_up) & sample==1 , vce(cluster abstag)
		outreg2 using table_a3.xls , excel  stats(coef se  ) noaster cttop("time FE") dec(2) append	label

		
		reg turnout    postal_all ///
		i.abstag i.canton  	  catholic  university share_over60 ///
		if inrange(year,1981,year_up) & sample==1 , vce(cluster abstag)
		outreg2 using table_a3.xls , excel  stats(coef se  ) noaster cttop("time FE") dec(2) append	label

		

		
	*********************************************************************************
	* Table A.4: Table A.4: The Effects of Postal Voting on Turnout in Referendums, 1981-2009 (Probit Models, Individual-level Data)
	*********************************************************************************
			
		* (i) Clustering per referendum day
		
		scalar year_up=2011
		
		use data3.dta, clear
		
		egen abstag=group(year month day)
		matrix tableA4_beta=J(3,1,.)
		matrix tableA4_beta_se=J(3,1,.)
		
		
		reg turnout    postal_all ///
		i.abstag i.canton i.group_educ i.group_age i.group_religion  if inrange(year,1980,year_up)  , vce(cluster abstag)
		gen esample=e(sample)
		
		probit turnout    postal_all i.canton ///
		if inrange(year,1980,year_up) & esample==1 , vce(cluster abstag)


		
		margins, dydx( postal_all) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[1,1]=beta1[1,1]
		matrix tableA4_beta_se[1,1]=sqrt(beta_cov1[1,1])


		probit turnout    postal_all ///
		i.abstag i.canton   if inrange(year,1980,year_up)  & esample==1, vce(cluster abstag)

		
		margins, dydx( postal_al) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[2,1]=beta1[1,1]
		matrix tableA4_beta_se[2,1]=sqrt(beta_cov1[1,1])
				
		probit turnout    postal_all ///
		i.abstag i.canton i.group_educ i.group_age i.group_religion  if inrange(year,1980,year_up) & esample==1 , vce(cluster abstag)

		
		margins, dydx( postal_all) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[3,1]=beta1[1,1]
		matrix tableA4_beta_se[3,1]=sqrt(beta_cov1[1,1])
		
		display "Estimates of Table A.4 are (clustered by referendum day):"
		display "Point estimates"
		matlist tableA4_beta
		display "Standard errors"
		matlist tableA4_beta_se
		
		
		
		* (ii) Clustering by canton 
		
		use data3.dta, clear
		
		egen abstag=group(year month day)
		matrix tableA4_beta=J(3,1,.)
		matrix tableA4_beta_se=J(3,1,.)
		
		
		reg turnout    postal_all ///
		i.abstag i.canton i.group_educ i.group_age i.group_religion  if inrange(year,1980,year_up)  , vce(cluster canton)
		gen esample=e(sample)
		
		probit turnout    postal_all i.canton ///
		if inrange(year,1980,year_up) & esample==1 , vce(cluster abstag)


		
		margins, dydx( postal_all) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[1,1]=beta1[1,1]
		matrix tableA4_beta_se[1,1]=sqrt(beta_cov1[1,1])


		probit turnout    postal_all ///
		i.abstag i.canton   if inrange(year,1980,year_up)  & esample==1, vce(cluster canton)
		
		margins, dydx( postal_al) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[2,1]=beta1[1,1]
		matrix tableA4_beta_se[2,1]=sqrt(beta_cov1[1,1])
				
		probit turnout    postal_all ///
		i.abstag i.canton i.group_educ i.group_age i.group_religion  if inrange(year,1980,year_up) & esample==1 , vce(cluster canton)

		
		margins, dydx( postal_all) // (c) marginal effects
		matrix beta_cov1=r(V)
		matrix beta1=r(b)'
		matrix tableA4_beta[3,1]=beta1[1,1]
		matrix tableA4_beta_se[3,1]=sqrt(beta_cov1[1,1])
		
		matlist tableA4_beta
		matlist tableA4_beta_se
		
		display "Estimates of Table A.4 are (clustered by canton):"
		display "Point estimates"
		matlist tableA4_beta
		display "Standard errors"
		matlist tableA4_beta_se
		
		
		


		